<template>
<div class="header-title">
    <div class="logo">
      <img src="" alt="">
      <!-- 不怎么实用捏工具 -->
    </div>
    <div class="title_menu">
      <el-icon size="24"><FullScreen @click="max" /></el-icon>
      <el-icon size="24"><Close @click="close" /></el-icon>
    </div>
  </div>
</template>
<script setup lang="ts">
import { ipcRenderer } from "electron";
import { Close,FullScreen } from "@element-plus/icons-vue";

//关闭窗口 下面都是写在函数里在别的地方调用，核心是里面的
const close = () => {
  ipcRenderer.send("window-close");
};

const max = () => {
  ipcRenderer.send("window-max");
};
</script>

<style lang="scss" scoped>
button {
 -webkit-app-region: no-drag; //设置不可拖拽
}
.header-title {
   -webkit-app-region: drag;//设置头部可拖拽
   -webkit-user-select:none;//禁用文本选择 防止在拖动范围内选中了文字
   background-color: #ffffff;
   height: 40px;
   display: flex;
   justify-content: space-between;
   align-items: center;
  .title_menu {
       display: flex;
       place-items: center center;
       height: 100%;
       -webkit-app-region: no-drag; //设置不可拖拽
   }
 }
</style>